{if isset($messages) AND !empty($messages)}
{foreach from=$messages item=message}
<div class="alert alert-{$message.type}">
    <a class="close" data-dismiss="alert">×</a>
    {$message.text}
</div>
{/foreach}
{/if}